//
//  AppDelegate+BlurryImage.h
//  test
//
//  Created by xxh on 2022/1/20.
//

/*
使用方法:
1. 在delegate中引入分类
#import "AppDelegate+BlurryImage.h"
2.在生命周期方法中添加以下方法
- (void)applicationDidBecomeActive:(UIApplication *)application {
[self removeBlurryViewInWindow];
}
- (void)applicationDidEnterBackground:(UIApplication *)application {
[self showBlurryViewInWindow];
}
- (void)applicationWillResignActive:(UIApplication *)application {
[self showBlurryViewInWindow];
}
- (void)applicationWillEnterForeground:(UIApplication *)application {
[self removeBlurryViewInWindow];
}

applicationWillResignActive 失去焦点的时候会首先调用
applicationDidEnterBackground 切换到后台后调用。在WillResignActive之后调用
applicationWillEnterForeground 将要回到前台的时候调用
applicationDidBecomeActive 已经到前台后调用

//生命周期调用情况
1. 其中点击home，切换到后台，再点击app,四个状态都会调用。
applicationWillResignActive,applicationDidEnterBackground,applicationWillEnterForeground,applicationDidBecomeActive

2.双击home,再点击app的话只会调用applicationWillResignActive和applicationDidBecomeActive

这里采用这种方案:
applicationWillResignActive/applicationDidEnterBackground --> showBlurryViewInWindow
applicationWillEnterForeground/applicationDidBecomeActive --> removeBlurryViewInWindow
*/


#import "AppDelegate.h"

NS_ASSUME_NONNULL_BEGIN

@interface AppDelegate (BlurryImage)
//添加高斯模糊页面
- (void)showBlurryViewInWindow;
//去除高斯模糊页面
- (void)removeBlurryViewInWindow;
@end

NS_ASSUME_NONNULL_END
